import { BaseEntity } from './base.entity';
import { Column, ManyToMany, JoinTable, Entity } from 'typeorm';
import { PicEntity } from './pic.entity';

@Entity()
export class PicClassifyEntity extends BaseEntity {
  @Column({ type: 'varchar' })
  classify_name: string;
  @ManyToMany(
    type => PicEntity,
    picEntity => picEntity.classify,
  )
  @JoinTable({ name: 'pic_classify_union' })
  pics: PicEntity[];
}
